package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CdLogModifica generated by hbm2java
 */
@Entity
@Table(name = "CD_LOG_MODIFICA", schema = "CTROLDOC")
public class CdLogModifica implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7861409578265958476L;
	private Long ncorrelativo;
	private String sllaveTabla;
	private String maccion;
	private String stabla;
	private String cusuario;
	private Date fhmodificacion;
	private Set<CdLogModDet> cdLogModDets = new HashSet<CdLogModDet>(0);

	public CdLogModifica() {
	}

	public CdLogModifica(Long ncorrelativo, String sllaveTabla, String maccion,
			String stabla) {
		this.ncorrelativo = ncorrelativo;
		this.sllaveTabla = sllaveTabla;
		this.maccion = maccion;
		this.stabla = stabla;
	}

	public CdLogModifica(Long ncorrelativo, String sllaveTabla, String maccion,
			String stabla, String cusuario, Date fhmodificacion,
			Set<CdLogModDet> cdLogModDets) {
		this.ncorrelativo = ncorrelativo;
		this.sllaveTabla = sllaveTabla;
		this.maccion = maccion;
		this.stabla = stabla;
		this.cusuario = cusuario;
		this.fhmodificacion = fhmodificacion;
		this.cdLogModDets = cdLogModDets;
	}

	@Id
	@Column(name = "N_CORRELATIVO", unique = true, nullable = false, precision = 10, scale = 0)
	public Long getNcorrelativo() {
		return this.ncorrelativo;
	}

	public void setNcorrelativo(Long ncorrelativo) {
		this.ncorrelativo = ncorrelativo;
	}

	@Column(name = "S_LLAVE_TABLA", nullable = false, length = 75)
	public String getSllaveTabla() {
		return this.sllaveTabla;
	}

	public void setSllaveTabla(String sllaveTabla) {
		this.sllaveTabla = sllaveTabla;
	}

	@Column(name = "M_ACCION", nullable = false, length = 1)
	public String getMaccion() {
		return this.maccion;
	}

	public void setMaccion(String maccion) {
		this.maccion = maccion;
	}

	@Column(name = "S_TABLA", nullable = false, length = 18)
	public String getStabla() {
		return this.stabla;
	}

	public void setStabla(String stabla) {
		this.stabla = stabla;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	//@Temporal(TemporalType.DATE)
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_MODIFICACION", length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cdLogModifica")
	public Set<CdLogModDet> getCdLogModDets() {
		return this.cdLogModDets;
	}

	public void setCdLogModDets(Set<CdLogModDet> cdLogModDets) {
		this.cdLogModDets = cdLogModDets;
	}

}
